﻿
 <div class="header">
            <div class="container">
                <div class="logo">
                    <div class="logo-image">
                    <h1><a href="#"></a></h1>
                    </div>
                </div>

                <div class="header-r">
                    <ul>
            <LI><input type="text" value="Tìm kiếm" name="timkiem" onblur="if (this.value=='') this.value='Tìm kiếm';" onfocus="if (this.value=='Tìm kiếm') this.value='';" class="timkiem">

            <input name="" type="submit" value="gfffgfd" />

            </LI>
            <li class="COR">
            <div class="btl-panel" style="float: right;">
            @if (Session["user"]==null)
            {
            <span id="btl-panel-login" class="btl-dropdown">ĐĂNG NHẬP</span> 
            <span>|</span>
            <span id="btl-panel-registration" class="btl-dropdown">ĐĂNG KÝ</span>
             @Html.Raw(@Session["errorlogin"])
            }
            else
            {
                <span class="btl-dropdown">Xin chào!</span> 
                <span class="btl-dropdown">@Session["user"]</span>
                <span class="btl-dropdown"><a class="logoff" href="#" onclick="out();">Thoát</a></span>
                }
            </div>
            <script type="text/javascript">
                /*<![CDATA[*/
                var btlOpt =
                {
                    BT_AJAX: 'http://demo.bowthemes.com/bt-real-estate/',
                    BT_RETURN: '/bt-real-estate/',
                    RECAPTCHA: '0',
                    LOGIN_TAGS: '',
                    REGISTER_TAGS: '',
                    EFFECT: 'btl-dropdown',
                    ALIGN: 'right',
                    BG_COLOR: '#dd2751',
                    MOUSE_EVENT: 'hover',
                    TEXT_COLOR: '#ffffff',
                    LB_SIZE: 'auto,auto',
                    RB_SIZE: 'auto,auto'
                }
                if (btlOpt.ALIGN == "center") {
                    BTLJ(".btl-panel").css('textAlign', 'center');
                } else {
                    BTLJ(".btl-panel").css('float', btlOpt.ALIGN);
                }
                BTLJ("input.btl-buttonsubmit,button.btl-buttonsubmit").css({ "color": btlOpt.TEXT_COLOR, "background": btlOpt.BG_COLOR });
                //BTLJ("#btl .btl-panel > span").css({"color":btlOpt.TEXT_COLOR,"background-color":btlOpt.BG_COLOR,"border":btlOpt.TEXT_COLOR});
                /*]]>*/
            </script>

                   <div id="btl-content">
			
		            <!-- Form login -->	
		            <div id="btl-content-login" class="btl-content-block" style="right: 253px; top: 40px;">
                    <div class="login-1">
                       @using (Html.BeginForm("Login", "Account", FormMethod.Post, new { enctype = "multipart/form-data" }))
                       {
			             <fieldset>
                                <ol>
                                    <li>
                                        <label >Email<span class="star">&nbsp;*</span></label>
                                        <input name="Email" id="Email" type="text" size="30">
                            
                                    </li>
                                    <li>
                                        <label >Mật Khẩu<span class="star">&nbsp;*</span></label>
                                        <input id="pass" name="pass" type="password" size="30">
                            
                                    </li>
                       
                                </ol>
                                <div class="clear10"></div>
                                 <div class="pull-left"> 
                                 <input class="button-c"  type="submit" name="" value="Đăng Nhập" onclick="">
                                        <a class="pull-left" style="margin:5px 5px 0px 0px" href="#">Quên Mật Khẩu của Bạn ?</a>
                            
                                  </div>
                            </fieldset>	
                       }		
		            </div>
		            </div>
                <div id="btl-content-registration" class="btl-content-block" style="right: 253px; top: 40px;">			
			            <!-- if not integrated any component -->
                    <div class="login-1 ">
                        @using (Html.BeginForm("Register", "Account", FormMethod.Post, new { enctype = "multipart/form-data" }))
                        {
                        <fieldset>
                            <ol>
		                    <li>
                            <label >Tên<span class="star">&nbsp;*</span></label>
                            <input id="username" name="username" type="text" size="30" >
                            </li>
                            <li>
                            <label>Email<span class="star">&nbsp;*</span></label>
                            <input id="email" name="email" type="text" onblur="kiemtra();" size="30" >
                             <label id="erroremail" style="color:red"></label>
		                    </li>
                             <li>
                            <label >Mật Khẩu<span class="star">&nbsp;*</span></label>
                            <input id="password" name="password" type="password" size="30" >
		                    </li>
                             <li>
                            <label>Nhập lại mật khẩu<span class="star">&nbsp;*</span></label>
                            <input id="repassword" name="repassword" type="password" onblur="testPass();" size="30" >
                            <label id="messa" style="color:red"></label>
		                    </li>
                            <li>
                            <label>Điện thoại</label>
                            <input id="phone" name="phone" type="text" size="30" >
                            </li>
                             <li>
                            <label>Địa chỉ</label>
                            <input id="address" name="address" type="text" size="30" >
                            </li>
                             <li>
                           <p class="radio"> <input name="" type="checkbox" value="" /> Đăng ký nhận bản tin của chúng tôi
                                </p>
                            <p class="radio"><input name="" type="checkbox" value="" />Nhận được ưu đãi đặc biệt từ các đối tác của chúng tôi
                                </p>
		                    </li>
                            <li class="pull-left"><input class="button-c" id="test" type="submit" name="" value="Đăng Ký" onclick=""> </li>
                            </ol>
                            </fieldset>
                        }
                       @Html.Raw( @Session["nosucess"])
            
            </div><!--end coment-->	
                </div>

            <!-- if  integrated any component -->
                </div>
            </li>

            <li class="time-d"><span id="divNow">
            <script type="text/javascript">
            <!--
    DateTime.Show('divNow');
    //-->
            </script>
            </span></li>

            </ul>
            </div><!--end header-r-->
            </div>
</div><!--end header-->
<script type="text/javascript">
    function testPass() {
        $(document).ready(function () {
            var p = document.getElementById('password').value;
            var rp = document.getElementById('repassword').value;
            if (p != rp) {
                document.getElementById('messa').innerHTML = 'Mật Khẩu Nhập lại không đúng';
                document.getElementById('repassword').value = "";
            }
        });
    }

    function out() {
        $(document).ready(function () {
            $.post('/Account/LogOff', {}, function () {
                location.reload();
            })
        })
    };


    function kiemtra() {
        $(document).ready(function () {
            var mail = document.getElementById('email').value;
            if (mail.length == 0) {
                document.getElementById('erroremail').innerHTML = 'Vui lòng nhập email';
                $('test').attr('disabled', 'disabled');
                return false;
            }

        }
         )
    };
</script>

